<admintpl file="header" />
</head>
<body>
	<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a href="javascript:;">设备明细</a></li>
			<li><a href="{:U('Slistadmin/add')}" target="_self">{:L('ADD')}</a></li>
		</ul>
		<form class="well form-search" method="post" action="{:U('Slistadmin/ssearch')}">
			设备分类： 
			<select class="select_2" name="type">
				<option value='' selected="selected"></option>
				<volist name="gtype" id="vo">				
				<option value='{$vo.type_name}'>{$vo.type_name}</option>
				</volist>
			</select> &nbsp;&nbsp;
			使用单位： 
			<select class="select_2" name="jg">
				<option value='' selected="selected"></option>
				<volist name="gjg" id="vo">				
				<option value='{$vo.jg_name}'>{$vo.jg_name}</option>
				</volist>
			</select> &nbsp;&nbsp;
			设备编号： 
			<input type="text" name="keyword" style="width: 200px;"  placeholder="请输入准确无误的设备编号">
			<input type="submit" class="btn btn-primary" value="搜索" />
		</form>
		<form class="js-ajax-form" action="" method="post">
			<div class="table-actions">				
				<button class="btn btn-primary btn-small js-ajax-submit" type="submit" data-action="{:U('Slistadmin/delete')}" data-subcheck="true" data-msg="你确定删除吗？">{:L('DELETE')}</button>
				<button class="btn btn-primary btn-small js-articles-move" type="button">批量移动</button>
			</div>
			<table class="table table-hover table-bordered table-list">
				<thead>
					<tr>
						<th width="15"><label><input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x"></label></th>
						<th width="50">{:L('SBBH')}</th>
						<th width="50">{:L('SBLB')}</th>
						<th width="50">{:L('SYDW')}</th>
						<th width="50">{:L('SBXH')}</th>
						<th width="50">{:L('SBSN')}</th>
						<th width="50">{:L('SBPP')}</th>					
						<th width="80">{:L('GZRQ')}</th>						
						<th width="80">{:L('WHRQ')}</th>
						<th width="70">{:L('LYR')}</th>
						<th width="50">{:L('STATUS')}</th>
						<th width="70">{:L('ACTIONS')}</th>
					</tr>
				</thead>
				<php>
				$status=array("1"=>"已审核","0"=>"未审核");
				$top_status=array("1"=>"已置顶","0"=>"未置顶");
				$recommend_status=array("1"=>"已推荐","0"=>"未推荐");
				</php>
				<foreach name="lists" item="vo">
				<tr>
					<td><input type="checkbox" class="js-check" data-yid="js-check-y" data-xid="js-check-x" name="ids[]" value="{$vo.id}" title="ID:{$vo.id}"></td>
					<td>{$vo.id}</td>
					<td><a href="{:U('Slistadmin/showinfo',array('id'=>$vo['id']))}"> <span>{$vo.sblb}</span></a></td>
					<td>{$vo.sydw}</td>
					<td>{$vo.sbxh}</td>
					<td>{$vo.sbsn}</td>
					<td>{$vo.sbpp}</td>
					<td>{$vo.gzrq}</td>
					<td>{$vo.whrq}</td>
					<td>{$vo.lyr}</td>
					<td>{$vo.sbzt}</td>
					<td>
						<a href="{:U('Slistadmin/edit',array('id'=>$vo['id']))}">{:L('EDIT')}</a> | 
						<a href="{:U('Slistadmin/delete',array('id'=>$vo['id']))}" class="js-ajax-delete">{:L('DELETE')}</a></td>
				</tr>
				</foreach>				
			</table>			
			<div class="pagination" style="float:right">&nbsp&nbsp共【{$lists_count}】条记录{$Page}</div>
		</form>
	</div>
	<script src="__PUBLIC__/js/common.js"></script>		
		
	<script>
		function refersh_window() {
			var refersh_time = getCookie('refersh_time');
			if (refersh_time == 1) {
				window.location = "{:U('AdminPost/index',$formget)}";
			}
		}
		setInterval(function() {
			refersh_window();
		}, 2000);
		$(function() {
			setCookie("refersh_time", 0);
			Wind.use('ajaxForm', 'artDialog', 'iframeTools', function() {
				//批量移动
				$('.js-articles-move').click(function(e) {
					var str = 0;
					var id = tag = '';
					$("input[name='ids[]']").each(function() {
						if ($(this).attr('checked')) {
							str = 1;
							id += tag + $(this).val();
							tag = ',';
						}
					});
					if (str == 0) {
						art.dialog.through({
							id : 'error',
							icon : 'error',
							content : '您没有勾选信息，无法进行操作！',
							cancelVal : '关闭',
							cancel : true
						});
						return false;
					}
					var $this = $(this);
					art.dialog.open("__ROOT__/index.php?g=portal&m=AdminPost&a=move&ids="+ id, {
						title : "批量移动",
						width : "80%"
					});
				});
			});
		});
	</script>
</body>
</html>